function validate(){
	var depCity = $('#depCity').val();
	var arrCity = $('#arrCity').val();
	var depDate = $('#depDate').val();
	var arrDate = $('#arrDate').val();
	if(depCity==arrCity){
		 alert('出发城市不能和到达城市相同');
		 return false;
	}
	var dep = depDate.split("-");
	if(arrDate.split("-")){
		var arr = arrDate.split("-");
		var starttime = new Date(dep[0], dep[1], dep[2]);
		var endtime = new Date(arr[0], arr[1], arr[2]);
		 if (starttime >= endtime) {
		    alert('到达日期至少比出发日期多一天');
		    return false;
		 }
	}
	 return true;
}

function isEqual(firstSelect,secondSelect){
	var from = firstSelect.val();
	var to = secondSelect.val();
	if(from == to){
		alert('出发城市和到达城市不能相同');
		return false;
	}else{
		return true;
	}
}

function initSelectorValidate(select){
	select.combobox({
		 onSelect: function(rec){  
			 select.val(rec.value);
	     }
	})
}

function checkText(){
	flag = true;
	var depCity = $('#depCity').val().trim();
	var arrCity = $('#arrCity').val().trim();
	var depDate = $('#depDate').val().trim();
	if(depCity == '' || arrCity == '' || depDate == '') {
		alert("输入有误,请重新输入!");
		flag = false;
	}
return flag;
}

function parseObj( strData ){
    return (new Function( "return " + strData ))(); 
}